package com.seamtop.cuber.web.controller.common;

import com.seamtop.cuber.web.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by feng on 2015/11/12.
 */

@Controller("CommonController")
@RequestMapping("common")
public class CommonController extends BaseController{

    @RequestMapping("/header.shtml")
    public String header(HttpServletRequest request, HttpServletResponse response,
                         ModelMap model) {
        super.init(request,model);
        return "/common/header";
    }

    @RequestMapping("/footer.shtml")
    public String footer(HttpServletRequest request, HttpServletResponse response,
                         ModelMap model) {
        return "/common/footer";
    }

    @RequestMapping("/404.shtml")
    public String redirect404(HttpServletRequest request, HttpServletResponse response,
                    ModelMap model) {
        System.out.println("404");
        return "/common/404";

    }
}
